Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remix projects context menu #4893

Merged
merged 8 commits into from
Feb 14, 2024
Merged

Remix projects context menu #4893

merged 8 commits into from
Feb 14, 2024

Conversation

ruggi
Copy link
Contributor

@ruggi ruggi commented Feb 14, 2024

Fix #4892

This PR is a followup to #4884 which adds a proper context menu for project entries.

  • Added Radix UI components for dropdown menus
  • Removed the old button actions
  • Added a single entry point for actions inside the context menu (no icons yet!), with multiple options (depending on whether the active or trash categories are active)
  • Added more actions (open, copy-link, rename)

Notes

  • TODO: The selected category is passed down to components in a quite clunky way - should be solved by storing it in a proper store (e.g. zustand) but I figured to do it in a subsequent PR rather than making this one chunkier.
  • TODO: show a notification toast when copying a link.
  • Again, styling is kept to the bare minimum.
Screen.Recording.2024-02-14.at.12.33.58.PM.mov

@ruggi ruggi changed the title context menu Remix projects context menu Feb 14, 2024
Copy link
Contributor

github-actions bot commented Feb 14, 2024

Try me

Copy link

relativeci bot commented Feb 14, 2024

Job #10441: Bundle Size — 61.74MiB (~-0.01%).

aba8fd4(current) vs d299c8d master#10417(baseline)

Warning

Bundle contains 57 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
Job #10441
     Baseline
Job #10417
Regression  Initial JS 34.78MiB(~+0.01%) 34.78MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 20.48% 20.46%
No change  Chunks 28 28
No change  Assets 32 32
No change  Modules 4294 4294
No change  Duplicate Modules 493 493
No change  Duplicate Code 31.01% 31.01%
No change  Packages 455 455
No change  Duplicate Packages 57 57
Bundle size by type  Change 2 changes Regression 1 regression Improvement 1 improvement
                 Current
Job #10441
     Baseline
Job #10417
Regression  JS 61.73MiB (~+0.01%) 61.73MiB
Improvement  HTML 11.37KiB (-0.32%) 11.41KiB

View job #10441 reportView feat/remix-projects-context-menu branch activityView project dashboard

@ruggi ruggi marked this pull request as draft February 14, 2024 12:03
Copy link
Contributor

github-actions bot commented Feb 14, 2024

Performance test results:
(Chart1)
(Chart2)

@ruggi ruggi marked this pull request as ready for review February 14, 2024 12:55
</DropdownMenu.Content>
</DropdownMenu.Portal>

<fetcher.Form />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this self closing tag do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's the form component for the fetcher used to send the requests, as per the remix docs https://remix.run/docs/en/main/hooks/use-fetcher#fetcherform

@@ -0,0 +1,4 @@
body {
border: 1px solid transparent; /* Fix jumpy content when opening dropdowns */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks truly horrible!

@ruggi ruggi merged commit df30077 into master Feb 14, 2024
22 checks passed
@ruggi ruggi deleted the feat/remix-projects-context-menu branch February 14, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remix projects: context menu
4 participants